<!DOCTYPE html>
<html>

<head>
    <title>代码生成器</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/css/generator.css">
    <link rel="stylesheet" type="text/css" href="/css/style.css">
    <script src="/js/jq.min.js"></script>
</head>

<body>

<div class="centered-div" id="boxParent">
    <div class="layui-card custom inps">
        <label for="driver">Driver:</label>
        <input type="text" id="driver" name="driver" required>
        <label for="url">Url:</label>
        <input type="text" id="url" name="url" required>
        <label for="username">Username:</label>
        <input type="text" id="username" name="username" required>
        <label for="password">Password:</label>
        <input type="text" id="password" name="password" required>
    </div>
    <div class="layui-card inps">
        <label for="tableName">表名称:</label>
        <input type="text" id="tableName" name="tableName" required>
        <label for="tableFilterPrefix">过滤前缀:</label>
        <input type="text" id="tableFilterPrefix" name="tableFilterPrefix" required>
    </div>
    <div class="layui-card inps">
        <label for="path">生成文件路径:</label>
        <input type="text" id="path" name="path" required>
        <label for="pack">包名称:</label>
        <input type="text" id="pack" name="pack" required>
        <label for="xmlUrl">xml生成路径:</label>
        <input type="text" id="xmlUrl" name="xmlUrl" placeholder="默认与mapper同目录下">
    </div>

    <div class="layui-card radioBox">
        <div class="radioBox_item">
            <input type="checkbox" id="isGeneratorSelect" name="multipleSelection" value="option1">
            <label for="isGeneratorSelect">生成分页查询方法</label>
        </div>
        <div class="radioBox_item">
            <input type="checkbox" id="isGeneratorSave" name="multipleSelection" value="option2">
            <label for="isGeneratorSave">生成新增方法</label>
        </div>
        <div class="radioBox_item">
            <input type="checkbox" id="isGeneratorUpdate" name="multipleSelection" value="option3">
            <label for="isGeneratorUpdate">生成更新方法</label>
        </div>
        <div class="radioBox_item">
            <input type="checkbox" id="isGeneratorDelete" name="multipleSelection" value="option4">
            <label for="isGeneratorDelete">生成删除方法</label>
        </div>
        <div class="radioBox_item" id="GeneratorDeleteL">
            <label for="path">逻辑删除字段:</label>
            <input type="text" id="isGeneratorDeleteL" name="isGeneratorDeleteL" placeholder="为空生成直接删除方法">
        </div>

        <div class="radioBox_item">
            <label for="isGeneratorR">是否生成统一返回结果:</label>
            <input type="text" id="isGeneratorR" name="tableName" placeholder="如果之前没有生成过建议生成（文本框置空即可），如果生成过请输入返回结果的包路径">
        </div>
    </div>
    <div class="layui-card card1">
        <div class="radioBox_item mybatisPlusConfig">
            <input type="checkbox" id="isGeneratorMybatisPlusConfig" name="multipleSelection" value="option5">
            <label for="isGeneratorMybatisPlusConfig" style="width: 60%">生成mybatisPlusConfig文件，没有该文件分页查询总条数可能出问题</label>
        </div>
        <div class="radioBox orderFrom">
            <div class="radioBox_item SelectCustom">
                <input type="checkbox" id="isSelectCustom" name="isSelectCustom" value="option5">
                <label for="isSelectCustom">生成自定义查询方法</label>
            </div>
            <div id="customDefinition">
                <div class="radioBox_item" style="height: auto">
                    <div class="radioBox_item_1">
                        <input type="checkbox" id="isOrder" name="isOrder" value="option2">
                        <label for="isOrder">是否进行排序</label>
                    </div>
                    <div class="radioBox_item_2">
                        <div class="radioBox_item_2_l">
                            <input type="checkbox" id="isOrderASC" name="isOrderASC" value="option2">
                            <label for="isOrderASC">顺序排序</label>
                        </div>
                        <div class="radioBox_item_2_r" id="isOrderASC_inp">
                            <label for="isOrderASCValue">按照字段顺序排序：</label>
                            <input type="text" id="isOrderASCValue" name="isOrderASCValue" required
                                   placeholder="多个条件逗号隔开">
                        </div>
                    </div>
                    <div class="radioBox_item_2">
                        <div class="radioBox_item_2_l">
                            <input type="checkbox" id="isOrderDESC" name="isOrderDESC" value="option2">
                            <label for="isOrderDESC">逆序排序</label>
                        </div>
                        <div class="radioBox_item_2_r" id="isOrderDESC_inp">
                            <label for="isOrderDESCValue">按照字段逆序排序：</label>
                            <input type="text" id="isOrderDESCValue" name="isOrderDESCValue" required
                                   placeholder="多个条件逗号隔开">
                        </div>
                    </div>
                    <div class="radioBox_item_3" id="AddFun">
                        添加
                    </div>
                </div>
            </div>
        </div>
        <div class="listBox list1" id="listData">

        </div>
        <div class="radioBox_item">
          <input type="checkbox" id="isGeneratorExcelImport" name="isGeneratorExcelImport" value="option5">
          <label for="isGeneratorExcelImport" style="width: 50%">生成excel导入功能</label>
        </div>
        <div class="layui-card fx orderFrom">
          <div class="radioBox_item" style="width: 50%">
            <input type="checkbox" id="isGeneratorExcelDown" name="isGeneratorExcelDown" value="option5">
            <label for="isGeneratorExcelDown" style="width: 60%;">生成excel导出功能</label>
          </div>
          <div class="Excel_item_3" id="AddExcel">
            添加
          </div>
        </div>
        <div class="listBox" id="listData1">
        </div>

    </div>

    <div class="output"></div>
    <div class="butBox">
        <div class="buts" id="butSend">
            开始生成
        </div>

    </div>

</div>
<div class="night">
    <div class="shooting_star-container" id="shooting-star-container"></div>
</div>
<script>
    // 获取父级容器
    var container = document.getElementById("shooting-star-container");

    // 生成20个 shooting_star 元素并插入父级容器中
    for (var i = 0; i < 20; i++) {
        var shootingStar = document.createElement("div");
        shootingStar.classList.add("shooting_star");
        container.appendChild(shootingStar);
    }
</script>

</body>
<script src="/js/generator.js"></script>